Intersoft WebTextEditor Documentation
Client-side events
See Also Send Feedback
Intersoft WebTextEditor > WebFileUploader > Features > Client-side events

Glossary Item Box

WebFileUploader is designed with rock-solid API and extensible client-side events to give you total control over uploading process. Works in conjunction with real-time progress bar feature, WebFileUploader sent event notification to client-side in real-time - such as OnBeforeUpload, OnAfterUpload OnErrorUpload, and even OnUploading event.

The following lists the available client side events in more details:

 

The following example shows how to handle the client-side events, and shows the information passed to the parameter of each event.

<ISWebTextEditor:WebFileUploaderID="WebFileUploader1"runat="server"
Width="450px" UploadPath="./Upload"AllowAdd="false" AllowRemove="false">
<ClientSideEventsOnAfterUpload="doAfterUpload"
OnBeforeUpload="doBeforeUpload"OnCancelUpload="doCancelUpload"
OnInitialize="doInitialize"OnUploading="doProcessing"
OnError="doErrorUpload" /> </ISWebTextEditor:WebFileUploader>
C# Copy Code
function doAfterUpload(id, webFileUploadInfo)

{
WriteLog("AfterUpload Event : File " +
webFileUploadInfo.GetFileName() + " is uploaded.");
}

function doErrorUpload(id, webFileUploadInfo, errorMessage,
errorStackTrace)
{
WriteLog("ErrorUpload Event : File " +
webFileUploadInfo.GetFileName() + " is failed to upload due
to error '"+ errorMessage + "'");
}

function doBeforeUpload(id, webFileUploadInfo)
{
WriteLog("BeforeUpload Event : File " +
webFileUploadInfo.GetFileName() + " is about to upload.");
}

function doCancelUpload(id, webFileUploadInfo)
{
WriteLog("CancelUpload Event : File " +
webFileUploadInfo.GetFileName() + " is cancelled.");
}

function doInitialize(id)
{
WriteLog("Initialize Event : Initialize " + id + " control.");
}

function doProcessing(id, webFileUploadInfo)
{
WriteLog("Uploading Event : Uploading file " +
webFileUploadInfo.GetFileName() + " is " + webFileUploadInfo.UploadedLength + " bytes of " + webFileUploadInfo.ContentLength + " bytes.");
}

See Also

©2013. All Rights Reserved.